<?php

namespace App\Console\Commands;

use App\Http\Controllers\Admin\VideoController;
use App\Model\Video;
use Illuminate\Console\Command;
use DB;

class VideoInfo extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'video:log';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Command description';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        $this->addData();
    }

    public function addData() {

        $video= new VideoController();
        $video->is_episode();

        //Video::destroy(46);
        /*$time = time();
        $rand = rand(1, 1000);
        $id = DB::table('data_test')->insertGetId(['uuid' => $time, 'test_id' => $rand]);
        if ($id) {
            \Log::info('定时/数据插入成功');
        } else {
            \Log::error('定时/数据插入失败');
        }*/
    }
}
